package com.bieber.democamp.sharesession;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

/**
 * Created by bieber on 2015/3/16.
 */
public class Start {

    public static void main(String[] args) throws Exception {
        if(args.length!=0){
            if(args[0].equals("redis_conf")){
                System.setProperty("redis_conf",args[0]);
            }
        }else{
            System.setProperty("redis_conf","classpath:redis.properties");
        }
        WebAppContext webAppContext = new WebAppContext("sharesession/src/main/webapp","/");
        Server server = new Server(8080);
        server.setHandler(webAppContext);
        server.start();
        server.join();
    }
}
